package com.ruoyi.common.core.domain.model;

import java.io.Serializable;
import java.util.List;

/**
 * @author DELL
 */
public class TreeNode implements Serializable {
    private static final long serialVersionUID = 1L;
    /** 主键 */
    private Long id;
    /** 父级节点 */
    private Long pid;
    /** 节点名称 */
    private String name;
    /** 排序 */
    private Integer sort;
    /** 子节点集合 */
    private List<TreeNode> children;
    /**等级 */
    private Integer level;

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getPid() {
        return pid;
    }

    public void setPid(Long pid) {
        this.pid = pid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public List<TreeNode> getChildren() {
        return children;
    }

    public void setChildren(List<TreeNode> children) {
        this.children = children;
    }

    @Override
    public String toString() {
        return "TreeNode{" +
                "id=" + id +
                ", pid=" + pid +
                ", name='" + name + '\'' +
                ", sort=" + sort +
                ", children=" + children +
                ", level=" + level +
                '}';
    }
}
